<div id="main_body">

<style>
	.ui-autocomplete 
	{
		max-height: 300px;
		overflow-y: auto;
		overflow-x: hidden;
		padding-right: 20px;
		font-size:12px;
	}
</style>
<link rel="stylesheet" href="../app_themes/chosen/chosen.css" />

{literal}
<script type="text/javascript" src="../app_themes/jquery/jquery-1.6.2.js"></script>
<script type="text/javascript" src="../app_themes/jquery/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../app_themes/jquery/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../app_themes/jquery/ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../app_themes/jquery/ui/jquery.ui.autocomplete.js"></script>
<script type="text/javascript" src="../app_themes/chosen/chosen.jquery.js" ></script>

<script type="text/javascript">
$(function()
{	
	$(".fancy").chosen(); 
	$(".fancy-deselect").chosen({allow_single_deselect:true});
});
</script>
{/literal}

<form id='updateCompany' method="post" action="updateCompany.php">

<h1>Contact Information for Company</h1>

{if $message != ''}<p style="font-weight:bold;color:blue;">{$message}</p>{/if}{if $message == ''}<br />{/if}

<table class="signupForm">
	<tr>
		<td width='100%'>Company Name:</td>
        <td>
        	<input type="hidden" name="companyID" value="{$companyID}"  />
        	<input type="text" name="name" required="true" size='40%' x-moz-errormessage="Please enter your company name." value= "{$name}" > 
        	<spam class="error">{validate id='rv_companyName' message='*'}</span>
        </td>
	</tr>
    <tr>
    	<td>Industry: </td>
        <td>
        	<select name='industry' data-placeholder="Choose an Industry..." class="fancy" style="width:300px;">
          		<option value=""></option> 
                {foreach from=$industries key=k item=v name='iList'}<option value="{$k}"{if $k == $industry} selected="selected"{/if}>{$v}</option>
                {/foreach}
            </select>
        </td>
    </tr>
    <tr>
    	<td>Address:</td>
        <td>
        	<input type="text" name="address" required="true" size="40%" x-moz-errormessage="Please enter your address." value="{$address}" />
    		<span class="error">{validate id='rv_address' message='*'}</span>
        </td>
    </tr>
    <tr>
    	<td>City:</td>
        <td>
            <input type="text" name="city" required="true" size="40%" x-moz-errormessage="Please enter your city." value="{$city}" />
            <span class="error">{validate id='rv_city' message='*'}</span>
        </td>
    </tr>
    <tr>
    	<td>State:</td>
        <td><select name='state' data-placeholder="Choose a State..." class="fancy" style="width:175px;">
          		<option value="{$state}"></option> 
                {foreach from=$states key=k item=v name='sList'}<option value="{$k}"{if $k == $state} selected="selected"{/if}>{$v}</option>
                {/foreach}
            </select>
		</td>
    </tr>
    <tr>
    	<td>Zip:</td>
        <td>
            <input type="text" name="zip" required="true" pattern="{$zipREX}" 
            	size="10" maxlength="10" x-moz-errormessage="Please enter a valid zip-code" value="{$zip}"/>
            <span class="error">{validate id='rv_zip' message='*'}</span>
        </td>
    </tr>
    <tr height="20px"><td /></tr>
    <tr>
    	<td>Secondary Address:</td>
        <td><input type="text" name="address2" size="40%" value="{$address2}"/></td>
    </tr>
    <tr>
    	<td>Secondary City:</td>
		<td><input type="text" name="city2" size="40%" value="{$city2}"/></td>
    </tr>
    <tr>
    	<td>Secondary State:</td>
        <td><select name='state2' data-placeholder="Choose a State..." class="fancy" style="width:175px;">
          		<option value="{$state2}"></option> 
                {foreach from=$states key=k item=v name='sList'}<option value="{$k}"{if $k == $state2} selected="selected"{/if}>{$v}</option>
                {/foreach}
            </select></td>
    </tr>
    <tr>
    	<td>Secondary Zip:</td>
        <td><input type="text" name="zip2" size="10" maxlength="10" value="{$zip2}"/></td>
    </tr>
    <tr height="20px"><td /></tr>
    <tr>
    	<td>Phone Number:</td>
        <td><input type="text" name="phone" size="40%" required="true" 
        	pattern="{$phoneREX}" x-moz-errormessage="Please enter a valid phone number." value="{$phone}"/></td>
    </tr>
    <tr>
    	<td>Fax Number:</td>
        <td><input type="text" name="fax" size="40%" value="{$fax}"/></td>
    </tr>
    <tr>
    	<td>Website:</td>
        <td><input type="text" name="website" size="40%" value="{$website}"/></td>
    </tr>
    <tr>
    	<td>Email:</td>
        <td>
        	<input type="text" name="email" size="40%" required="true" pattern="{$emailREX}" 
            	x-moz-errormessage="Please enter a valid email address." value="{$email}"/>
            <span class="error">{validate id='rv_email' message='*'}</span>
        </td>
    </tr>
    <tr height="20px"><td /></tr>
</table>

<input type="submit" value="Submit" name="submit" />
<input type="reset" value="Reset" name="reset" />
</form>

</div>